﻿using System;
using System.Collections.Generic;


namespace Qetza.TeamFoundation.WorkItemQuery.Admin
{
    /// <summary>
    /// Defines the contract that a command container must implement.
    /// </summary>
    public interface ICommandContainer
    {
        #region Properties

        /// <summary>
        /// Gets the registered commands.
        /// </summary>
        /// <value>
        /// An enumeration of registered commands.
        /// </value>
        IEnumerable<ICommand> RegisteredCommands { get; }

        #endregion

        #region Methods

        /// <summary>
        /// Registers the specified command.
        /// </summary>
        /// <param name="command">
        /// The command to register.
        /// </param>
        /// <returns>
        /// The <see cref="ICommandContainer"/> object that this method was called on (this in C#, Me in Visual Basic).
        /// </returns>
        ICommandContainer RegisterCommand(ICommand command);

        /// <summary>
        /// Unregisters the command with the specified name.
        /// </summary>
        /// <param name="commandName">
        /// The command name to unregister.
        /// </param>
        /// <returns>
        /// The <see cref="ICommandContainer"/> object that this method was called on (this in C#, Me in Visual Basic).
        /// </returns>
        ICommandContainer UnregisterCommand(string commandName);

        #endregion
    }
}
